﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace LDCRNewEdit.Model
{
    public class SceneData
    {
        private Dictionary<Point, SceneNPC> _npcList = new Dictionary<Point, SceneNPC>();
        private Dictionary<Point, SceneJump> _jumpList = new Dictionary<Point, SceneJump>();

        /// <summary>
        /// 地图数据
        /// </summary>
        public SceneMap SceneMap { get; set; }

        /// <summary>
        /// 地图路径
        /// </summary>
        public string SceneMapPath { get; set; }

        /// <summary>
        /// 打开标志
        /// </summary>
        public byte OpenFlag { get; set; }

        /// <summary>
        /// 场景人物
        /// </summary>
        public Dictionary<Point, SceneNPC> SceneNPCList { get { return _npcList; } }

        /// <summary>
        /// 场景跳转
        /// </summary>
        public Dictionary<Point, SceneJump> SceneJumpList { get { return _jumpList; } }

    }

    /// <summary>
    /// 场景NPC对象
    /// </summary>
    public class SceneNPC
    {
        private List<SceneEvent> _eventList = new List<SceneEvent>();

        public byte EventType { get; set; }     //事件类型，0对话事件，1路过事件
        public int EID { get; set; }        //事件者编号
        public short X { get; set; }        //坐标X
        public short Y { get; set; }        //坐标Y
        public byte Direction { get; set; }     //方向
        public List<SceneEvent> EventList { get { return _eventList; } }    //事件列表
        public short Voice { get; set; }    //对话音效

    }

    /// <summary>
    /// 事件
    /// </summary>
    public class SceneEvent
    {
        public SceneEvent() { }
        public SceneEvent(string ID, byte Priority) { this.ID = ID; this.Priority = Priority; }
        public string ID { get; set; }       //事件编号
        public byte Priority { get; set; }  //优先级
    }

    /// <summary>
    /// 跳转场景
    /// </summary>
    public class SceneJump
    {
        public string SceneID { get; set; }

        public short X { get; set; }
        public short Y { get; set; }
        public short ToX { get; set; }
        public short ToY { get; set; }
    }
}
